package com.ourteam.system.api;

import com.ourteam.frame.web.AbstractSearchModel;
import com.ourteam.system.dao.SysRoleRelateDAOQueryBean;
import com.ourteam.system.domain.SystemRoleGroupRelate;

public class SystemRoleRelateSearchModel extends AbstractSearchModel<SysRoleRelateDAOQueryBean> {

	private long roleGroupId;

	@Override
	public String getMappedDAOField(String aProperty) {
		return SystemRoleGroupRelate.getMappedDAOField(aProperty);
	}

	@Override
	protected void doBuildQueryBean(SysRoleRelateDAOQueryBean queryBean) throws Exception {

		SysRoleRelateDAOQueryBean.Criteria criteria = queryBean.createCriteria();

		if (this.roleGroupId != 0) {
			criteria.andSysRoleGroupIdEqualTo(roleGroupId);
		}

	}

	public long getRoleGroupId() {
		return roleGroupId;
	}

	public void setRoleGroupId(long roleGroupId) {
		this.roleGroupId = roleGroupId;
	}

}
